package sw6.admin.gui.logic;

import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectStreamClass;
import java.io.StreamCorruptedException;

public class ModifiedObjectInputStream extends ObjectInputStream  {
	
	@SuppressWarnings("rawtypes")
	Class mClass;
	
	@SuppressWarnings("rawtypes")
	public ModifiedObjectInputStream(InputStream input, Class classType) throws StreamCorruptedException, IOException
	{
		super(input);
		mClass = classType;
	}
	
    protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException {
        ObjectStreamClass resultClassDescriptor = super.readClassDescriptor();
        resultClassDescriptor = ObjectStreamClass.lookup(mClass);
        
        return resultClassDescriptor;
    }
}

